package customerEnter.Frame.ehcache.Judge;

import customerEnter.tool.WhetherToEmpty;

/**
 * 放緩存更新時間
 * 
 * 类名称：MapEcacheSqlQUery 类描述： 创建人：dy 创建时间：2016-4-27 上午11:19:15
 * 
 */
@SuppressWarnings({ "static-access" })
public class MapEcacheUpdateTime {

	private static MapEcacheUpdateTime	MapEcacheUpdateTime;
	private final static String			setMap	= "MapEcacheUpdateTime";

	private MapEcacheUpdateTime() {

	}

	public static MapEcacheUpdateTime getMapEcacheUpdateTime() {
		if (WhetherToEmpty.ObjectWhetherToEmpty(MapEcacheUpdateTime)) {
			MapEcacheUpdateTime = new MapEcacheUpdateTime();
		}
		return MapEcacheUpdateTime;
	}

	public static void SetDataIf(String key, String Judge) {
		MapEcache.getMapEcache(setMap).setEachMap(key, Judge);
	}

	public static String GetDataIf(String key) {
		String time = "";
		try {
			time = MapEcache.getMapEcache(setMap).getEachMap(key).toString();
		} catch (Exception e) {
			time = "";
		}
		return time;
	}
}
